<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <p id="p">我是一个段落</p>
  <img src="ad/0D0100005E2EF493395059357930375A.jpg" id="img">
  <script>
     var pEle = document.getElementsByTagName('p');
     var imgEle = document.getElementById('img');
     window.alert(pEle);
     window.alert(imgEle);
  </script>
</body>
</html>